<%--
  Created by IntelliJ IDEA.
  User: H64
  Date: 2021/4/20
  Time: 16:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head>
    <title>年级列表</title>
</head>
<body>
<h1>共有${sList.size()}数据记录</h1>

<div><a href="/addStudent">添加学生信息</a> </div>
<%--<div><input type="button" value="Del" onclick="delete()"/></div>--%>

<table border="1">
    <thead>
    <tr>
        <th></th>
        <th>序号</th>
        <th>学号</th>
        <th>姓名</th>
        <th>住址</th>
        <th>email</th>
        <th>日期</th>
        <th>年级名称</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:if test="${sList !=null && sList.size()>0}">
    <c:forEach items="${sList}" var="eachRow">
    <tr>
        <th><input type="checkbox" value="${eachRow.id}"/></th>
        <th>${eachRow.id}</th>
        <td>${eachRow.stuno}</td>
        <td>${eachRow.stuname}</td>
        <td>${eachRow.address}</td>
        <td>${eachRow.email}</td>
        <td>${eachRow.borndate}---------
            <fmt:formatDate value="${eachRow.borndate}" pattern="yyyy-mm-dd"/></td>
         <td>${eachRow.grade.name}</td>
      <td><a href="">更新</a> &nbsp;&nbsp;&nbsp;<a href="">删除</a></td>

    </tr>
    </c:forEach>
    </c:if>
    </tbody>

</table>
</body>
</html>